//
//  TodaysPlantDataModel.h
//  TodaysPlan
//
//  Created by 寺田 篤史 on 11/09/26.
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <sqlite3.h>
#import "FMDatabase.h"

@interface TodaysPlanDataModel : NSObject{
    int recordId;
    int gender;
    NSString* userName;
}

@property (nonatomic, readwrite) int recordId;
@property (nonatomic, readwrite) int gender;
@property (nonatomic, readwrite, retain) NSString* userName;

+(NSMutableArray*)selectAll;
+(int) countAll;
+(TodaysPlanDataModel*)selectById:(int)recordId;
+(int) saveId:(int)recordId gender:(int)gender userName:(NSString*)userName;
+(void) deleteId:(int)recordId;

+(void)insertTodaysPlan:(NSString *)registDate task:(NSString *)task memo:(NSString *)memo
               priority:(NSString *)priority reminder:(int)reminder reminderDate:(NSString *)reminderDate;
+(void)updateTodaysPlan:(int)id  task:(NSString *)task memo:(NSString *)memo
priority:(NSString *)priority reminder:(int)reminder reminderDate:(NSString *)reminderDate 
done:(NSString *)done;
+(void)deleteTodaysPlan:(int)id;
+(int)countTodaysPlan:(NSString*)today;
// local
+(TodaysPlanDataModel*) createAccountModel:(FMResultSet*)rs;

@end
